<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>贝塞尔曲线</title>
    <script src="../dist/auto-drawing.min.js"></script>
  </head>
  <body style="background-color: #000">
    <div id="app"></div>
    <script type="module">
      const { createCanvas, createGroup, renderCanvas } = AutoDrawing
      const zr = createCanvas('app')
      const gp = createGroup()
      const data = [
        {
          type: 'bezierCurve',
          x1: 200,
          y1: 200,
          x2: 300,
          y2: 300,
          cpx1: 100,
          cpy1: 50,
          cpx2: 200,
          cpy2: 250,
          stroke: 'green',
          fill: 'green'
        }
      ]
      renderCanvas(zr, gp, data, {
        scale: true,
        translate: true
      })
    </script>
  </body>
</html>
